1. Field of the Invention
The present invention relates to the field of computer systems. More specifically, the present invention relates to methodology for converting pixels between different color depths, and its applications, including apparatuses incorporated with such methodology.
2. Background Information
A pixel value directly or indirectly denotes a color, or more specifically, a particular shade of the color, to be rendered on a display for a picture element (pixel). The former is referred to as a direct color pixel, whereas the latter is referred to as an indexed color pixel. A direct color pixel explicitly specifies the RGB information of the color, whereas an indexed color pixel implicitly specifies the RGB information by indexing a RGB color entry in a color table. The number of colors available in a color space depends on the number of bits employed, which is referred to as the color depth. For example, a 16-bit direct color pixel may specify a color formed from any one of 32 levels of intensity of R, G, as well as B, employing 5 bits each for R, G, and B (1 unused bit), whereas an 8-bit indexed color pixel may specify any one of 256 colors. Typically, direct color pixels are either 16 or 32 bits, whereas indexed color pixels are 1, 2, 4 or 8 bits (1 bit=black/white, 2 bits=4 shades of grey). The color depth employed is application dependent, depending on the hardware and/or software of a particular situation.
Thus, for applications or equipment designed to operate with different color depths to work together, it is necessary to convert the pixels from one color depth to another color depth. Note that when conversion is needed, it is not just for one or two pixels, each pixel of each display screen has to be converted. Typically, the conversion is performed by finding the closest color using the Euclidean Distance Formula, i.e. min distance=square root [(R1-R2) 2+(G1-G2) 2+(B1-B2) 2], where (R1,G1,B1) and (R2, G2,B2) are the RGB values of the pixel in the two color spaces. Today, most operating systems include pixel conversion service for converting pixels between different color depths, among the system services offered, and provide an API for applications to invoke such service in real time.
Over the last decade, the price/performance of color monitors has dramatically improved, resulting in color monitors virtually replacing monochrome monitors as standard equipment, except perhaps in the case of system consoles and the like. Moreover, pixel resolution has increased substantially. For example, it is no longer uncommon to find equipment/application operating with a 1,024.times.768 pixel resolution, i.e. 1,024.times.768 pixels per display screen. In turn, more applications are exploiting colors to enhance end user experience, that is greater color depths are being employed. At the same time, as networking and communication technology continues to advance, more and more computer systems from different manufacturers are interconnected together. As a result, the frequency of situations requiring pixel conversion between different color depths arising has increased dramatically. The prior art approach of invoking an operating system service to convert pixel from one color depth to another color depth in real time, employing the Euclidean Distance Formula, has become too computational intensive, and therefore unacceptably slow. Moreover, in a number of situations, the need for pixel conversion from one color depth to another color depth arises at interrupt time, e.g. remote control service applications, and for certain operating systems, e.g. MacOS available from Apple Computer of Cupertino, Calif., the pixel conversion service between different color depths cannot be invoked through the API, when servicing an interrupt. Thus, an improved approach to converting pixels from one color depth to another color depth in real time is desired.